<template>
  <view class="pay-success-bg">
    <!-- 顶部栏 -->
    <view class="pay-header">
      <uni-icons type="left" size="24" @click="goBack" style="color: white;margin-right: 10px"/>
      <view class="pay-title">订单支付</view>
    </view>

    <!-- 支付成功卡片 -->
    <view class="pay-success-card">
      <view class="pay-success-icon">
        <image src="/static/yyq/success.png" mode="aspectFit" style="width:60px;height:60px;" />
      </view>
      <view class="pay-success-text">支付成功</view>
      <view class="pay-success-amount">39.90</view>
      <view class="pay-success-order">预约编号：324252536363634</view>
      <button class="pay-btn-primary" @click="goHome">返回首页</button>
      <button class="pay-btn-secondary" disabled>订单详情</button>
    </view>
  </view>
</template>

<script setup>
function goBack() {
  uni.navigateBack();
}
function goHome() {
  uni.navigateTo({ url: '/pages/yyq/index/index' });
}
</script>

<style scoped lang="scss">
.pay-success-bg {
  min-height: 100vh;
  background: #f5f6fa;
}
.pay-header {
  display: flex;
  align-items: center;
  height: 56px;
  background: #338aff;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  padding: 0 16px;
}
.pay-title {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}
.pay-success-card {
  background: #fff;
  border-radius: 16px;
  margin: 32px 16px 0 16px;
  padding: 32px 16px 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 8px rgba(51,138,255,0.04);
}
.pay-success-icon {
  margin-bottom: 12px;
}
.pay-success-text {
  font-size: 18px;
  color: #222;
  margin-bottom: 8px;
}
.pay-success-amount {
  font-size: 32px;
  font-weight: bold;
  color: #222;
  margin-bottom: 12px;
}
.pay-success-order {
  font-size: 15px;
  color: #888;
  margin-bottom: 24px;
}
.pay-btn-primary {
  width: 80%;
  margin: 8px 0;
  padding: 12px 0;
  border-radius: 24px;
  background: #338aff;
  color: #fff;
  font-size: 16px;
  border: none;
}
.pay-btn-secondary {
  width: 80%;
  margin: 8px 0;
  padding: 12px 0;
  border-radius: 24px;
  background: #eee;
  color: #bbb;
  font-size: 16px;
  border: none;
}
</style>
